<div class="gallery">
<?php if ($this->cooliris): ?>
<h2 style="text-align: center;"><?php echo $this->folder?></h2>
<object id="o" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="<?php echo $this->coolirisWidth; ?>" height="<?php echo $this->coolirisHeight; ?>">
    <param name="movie" value="http://apps.cooliris.com/embed/cooliris.swf" />
    <param name="allowFullScreen" value="true" />
    <param name="allowScriptAccess" value="always" />
    <param name="wmode" value="transparent"/>
    <param name="flashvars" value="feed=<?php echo $this->websiteUrl.'images/'.$this->folder.'/'.$this->folder.'.xml&numRows='.$this->coolirisRows.'&style='.$this->coolirisStyle; ?>" />
    <embed type="application/x-shockwave-flash" wmode="transparent" src="http://apps.cooliris.com/embed/cooliris.swf" 
           flashvars="feed=<?php echo $this->websiteUrl.'images/'.$this->folder.'/'.$this->folder.'.xml&numRows='.$this->coolirisRows.'&style='.$this->coolirisStyle; ?>"
           width="<?php echo $this->coolirisWidth; ?>" height="<?php echo $this->coolirisHeight; ?>" allowFullScreen="true" allowScriptAccess="always" >
    </embed>
</object>  
<?php else: ?>
<?php if(count($this->images) > 0 && is_array($this->images)): ?>
<ul style="list-style:none;" class="img_gallery">
    <?php foreach ($this->images as $image): ?>
    <li class="gallery_image"> <?php $size = getimagesize($this->path.$this->useFolder.'/'.$image); ?>
        <a href="<?php echo $this->websiteUrl.'images/'.$this->folder.'/original/'.$image; ?>" title="<?php echo str_replace('-','&nbsp;',ToolsHelper::cropType($image)); ?>" rel="<?php echo $this->folder; ?>" class="thickbox"><img src="<?php echo $this->websiteUrl.'images/'.$this->folder.'/'.$this->useFolder.'/'.$image; ?>" alt="<?php echo str_replace('-',' ',ToolsHelper::cropType($image)); ?>" width="<?php echo $size[0]; ?>" height="<?php echo $size[1]; ?>" /></a>
        <?php if ($this->caption): ?> <p class="image_caption"><?php echo $image; ?></p> <?php endif; ?>
    </li>
    <?php endforeach; ?>
</ul>
<?php endif; ?>
<p style="clear:both;"></p>
<?php endif; ?>
</div>